package com.example.chapter1;

import com.example.config.ActiveMqConfig;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 创 建 时 间: 2019/9/15
 * 版       本: V1.0
 * 作       者: qixin
 * 版 权 所 有: 版权所有(C)2019-2029
 */
@Log4j2
@Component
public class Receiver {

    @RabbitListener(queues = ActiveMqConfig.QUEUE_NAME)
    public void process(String msg){
        log.info("收到消息:"+msg);
    }
}
